

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Contributing &mdash; DScribe 0.3.0a0 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/css/style.css" type="text/css" />
    <link rel="author" title="About these documents" href="about.html" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Citing DScribe" href="citing.html" />
    <link rel="prev" title="dscribe.utils package" href="doc/dscribe.utils.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html">
          

          
            
            <img src="_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                0.3.0a0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="doc/modules.html">Documentation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#code-style-guideline">Code style guideline</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="citing.html">Citing DScribe</a></li>
<li class="toctree-l1"><a class="reference internal" href="about.html">About</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">DScribe</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>Contributing</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/contributing.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="contributing">
<h1>Contributing<a class="headerlink" href="#contributing" title="Permalink to this headline">¶</a></h1>
<p>Follow these general instructions if you wish to contribute a new descriptor
implementation to DScribe:</p>
<blockquote>
<div><ol class="arabic simple">
<li><p>Contact the authors to discuss your idea for a new descriptor
implementation.</p></li>
<li><p>Read the code style guideline (below).</p></li>
<li><p>Fork the repository and do all modifications within it.</p></li>
<li><p>Implement the descriptor as a class within a new module in
<em>dsribe/descriptors/</em>. The descriptor class should inherit from the
<a class="reference internal" href="doc/dscribe.descriptors.html#dscribe.descriptors.descriptor.Descriptor" title="dscribe.descriptors.descriptor.Descriptor"><code class="xref py py-class docutils literal notranslate"><span class="pre">Descriptor</span></code></a>-class.</p></li>
<li><p>Create new test module for the descriptor with the same module name, but
in <em>dscribe/regtests/</em>. The tests should be implemented within a new
class that inherits from the <code class="xref py py-class docutils literal notranslate"><span class="pre">TestBaseClass</span></code>-class found in
<em>dscribe/regtests/</em>. Add the new tests as part of
<em>dscribe/regtests/testrunner.py</em>.</p></li>
<li><p>Ensure that your new tests and the existing tests run succesfully. You
can run the tests by first installing the developer dependencies by
running <code class="code docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-r</span> <span class="pre">dscribe/devrequirements.txt</span></code>, and then
running <em>dscribe/regtests/testrunner.py</em>.</p></li>
<li><p>Create tutorial for the descriptor in <em>dscribe/docs/src/tutorials</em>.
Follow the structure of the existing tutorials.</p></li>
<li><p>Create a pull request in GitHub.</p></li>
</ol>
</div></blockquote>
<div class="section" id="code-style-guideline">
<h2>Code style guideline<a class="headerlink" href="#code-style-guideline" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><ul>
<li><p>The code is designed to run on Python 3 only from version 0.2.8 onwards.</p></li>
<li><p>The code style is guided by PEP 8, but ignoring the following:</p>
<blockquote>
<div><ul class="simple">
<li><p>E123: Closing bracket does not match indentation of opening bracket’s line</p></li>
<li><p>E124: Closing bracket does not match visual indentation</p></li>
<li><p>E126: Continuation line over-indented for hanging indent</p></li>
<li><p>E128: Continuation line under-indented for visual indent</p></li>
<li><p>E226: Missing whitespace around operator</p></li>
<li><p>E501: Line too long (82 &gt; 79 characters)</p></li>
<li><p>E401: Module level import not at top of file</p></li>
</ul>
</div></blockquote>
</li>
<li><p>Spaces over tabs. The indent size is 4 spaces.</p></li>
<li><p>Classes and functions should be documented by following the <a class="reference external" href="http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings">Google style guide</a>
that can be interpreted by the <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html">sphinx Napoleon-extension</a></p></li>
</ul>
</div></blockquote>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="citing.html" class="btn btn-neutral float-right" title="Citing DScribe" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="doc/dscribe.utils.html" class="btn btn-neutral float-left" title="dscribe.utils package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  
  <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
      <span class="fa fa-book"> Versions</span>
      v: 0.3.0a0
      <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
      <dl>
        <dt>Versions</dt>
        
          <dd><a href="https://singroup.github.io/dscribe/dev">0.3.0a0 (development)</a></dd>
        
          <dd><a href="https://singroup.github.io/dscribe">0.2.9 (latest stable)</a></dd>
        
      </dl>
    </div>
  </div>


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>